import axios from '../request'

//分页查询
export const houseLoanSelectByPage = (page) => axios.get("/api/pub/v2/house_loan/selectByPage", {
        params: {
            "page": page
        }

    })
    //插入
export const houseLoanInsert = (name, sex, nation, birthDate, cardNum, homeAddress, tel, currentAddress, workAddress, coupleName,
        coupleSex, coupleNation, coupleBirthDate, coupleCardNum, coupleHomeAddress, weddingDate,
        contractDate, loanDate, payDay, payWay, loanSum, loanGoal, loanTimeLimit, loanRate,
        overRate, deadlineDate, principal, interest, amount, litigationFee, securityFee,
        declaredFee, lawyerFee, gurantee, guaranteeNature, guranteePeriod, mortgageWay,
        mortgageLocation, mortgageDate, mortgageNum, mortgageCardNum, financialReportNo,
        lawsuitNum, executeNum, judgePrincipal, judgeInterest, courtLocation, accuserAddress,
        accuserPeople, companyName, companyAddress, legalPersonName, legalPersonPosition,
        paperSignDate, loanStartDate, loanEndDate
    ) => axios.post("/api/pub/v2/house_loan/insert", {
        "name": name,
        "sex": sex,
        "nation": nation,
        "birthDate": birthDate,
        "cardNum": cardNum,
        "homeAddress": homeAddress,
        "tel": tel,
        "currentAddress": currentAddress,
        "workAddress": workAddress,
        "coupleName": coupleName,
        "coupleSex": coupleSex,
        "coupleNation": coupleNation,
        "coupleBirthDate": coupleBirthDate,
        "coupleCardNum": coupleCardNum,
        "coupleHomeAddress": coupleHomeAddress,
        "weddingDate": weddingDate,
        "contractDate": contractDate,
        "loanDate": loanDate,
        "payDay": payDay,
        "payWay": payWay,
        "loanSum": loanSum,
        "loanGoal": loanGoal,
        "loanTimeLimit": loanTimeLimit,
        "loanRate": loanRate,
        "overRate": overRate,
        "deadlineDate": deadlineDate,
        "principal": principal,
        "interest": interest,
        "amount": amount,
        "litigationFee": litigationFee,
        "securityFee": securityFee,
        "declaredFee": declaredFee,
        "lawyerFee": lawyerFee,
        "gurantee": gurantee,
        "guaranteeNature": guaranteeNature,
        "guranteePeriod": guranteePeriod,
        "mortgageWay": mortgageWay,
        "mortgageLocation": mortgageLocation,
        "mortgageDate": mortgageDate,
        "mortgageNum": mortgageNum,
        "mortgageCardNum": mortgageCardNum,
        "financialReportNo": financialReportNo,
        "lawsuitNum": lawsuitNum,
        "executeNum": executeNum,
        "judgePrincipal": judgePrincipal,
        "judgeInterest": judgeInterest,
        "courtLocation": courtLocation,
        "accuserAddress": accuserAddress,
        "accuserPeople": accuserPeople,
        "companyName": companyName,
        "companyAddress": companyAddress,
        "legalPersonName": legalPersonName,
        "legalPersonPosition": legalPersonPosition,
        "paperSignDate": paperSignDate,
        "loanStartDate": loanStartDate,
        "loanEndDate": loanEndDate
    })
    //更新
export const houseLoanUpdate = (
    id, name, sex, nation, birthDate, cardNum, homeAddress, tel, currentAddress, workAddress, coupleName,
    coupleSex, coupleNation, coupleBirthDate, coupleCardNum, coupleHomeAddress, weddingDate,
    contractDate, loanDate, payDay, payWay, loanSum, loanGoal, loanTimeLimit, loanRate,
    overRate, deadlineDate, principal, interest, amount, litigationFee, securityFee,
    declaredFee, lawyerFee, gurantee, guaranteeNature, guranteePeriod, mortgageWay,
    mortgageLocation, mortgageDate, mortgageNum, mortgageCardNum, financialReportNo,
    lawsuitNum, executeNum, judgePrincipal, judgeInterest, courtLocation, accuserAddress,
    accuserPeople, companyName, companyAddress, legalPersonName, legalPersonPosition,
    paperSignDate, loanStartDate, loanEndDate
) => axios.post("/api/pub/v2/house_loan/update", {

    "id": id,
    "name": name,
    "sex": sex,
    "nation": nation,
    "birthDate": birthDate,
    "cardNum": cardNum,
    "homeAddress": homeAddress,
    "tel": tel,
    "currentAddress": currentAddress,
    "workAddress": workAddress,
    "coupleName": coupleName,
    "coupleSex": coupleSex,
    "coupleNation": coupleNation,
    "coupleBirthDate": coupleBirthDate,
    "coupleCardNum": coupleCardNum,
    "coupleHomeAddress": coupleHomeAddress,
    "weddingDate": weddingDate,
    "contractDate": contractDate,
    "loanDate": loanDate,
    "payDay": payDay,
    "payWay": payWay,
    "loanSum": loanSum,
    "loanGoal": loanGoal,
    "loanTimeLimit": loanTimeLimit,
    "loanRate": loanRate,
    "overRate": overRate,
    "deadlineDate": deadlineDate,
    "principal": principal,
    "interest": interest,
    "amount": amount,
    "litigationFee": litigationFee,
    "securityFee": securityFee,
    "declaredFee": declaredFee,
    "lawyerFee": lawyerFee,
    "gurantee": gurantee,
    "guaranteeNature": guaranteeNature,
    "guranteePeriod": guranteePeriod,
    "mortgageWay": mortgageWay,
    "mortgageLocation": mortgageLocation,
    "mortgageDate": mortgageDate,
    "mortgageNum": mortgageNum,
    "mortgageCardNum": mortgageCardNum,
    "financialReportNo": financialReportNo,
    "lawsuitNum": lawsuitNum,
    "executeNum": executeNum,
    "judgePrincipal": judgePrincipal,
    "judgeInterest": judgeInterest,
    "courtLocation": courtLocation,
    "accuserAddress": accuserAddress,
    "accuserPeople": accuserPeople,
    "companyName": companyName,
    "companyAddress": companyAddress,
    "legalPersonName": legalPersonName,
    "legalPersonPosition": legalPersonPosition,
    "paperSignDate": paperSignDate,
    "loanStartDate": loanStartDate,
    "loanEndDate": loanEndDate

})

//删除
export const houseLoanDelete = (id) => axios.get("/api/pub/v2/house_loan/deleteById", {
    params: {
        "id": id
    }
})


//模糊查询 分页
export const findByNameOrKey = (key, page) => axios.get("/api/pub/v2/house_loan/findByNameOrKey", {
    params: {
        "key": key,
        "page": page

    }

})


export const houseLoanDeleteById = (id) => axios.get("/api/pub/v2/house_loan/deleteById", {
    params: {

        "id": id
    }

})